home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19980901-19981211
/
000146_news@newsmaster….columbia.edu _Tue Oct 13 20:29:27 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id UAA25872
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 13 Oct 1998 20:29:26 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id UAA14500
for kermit.misc@watsun; Tue, 13 Oct 1998 20:29:25 -0400 (EDT)
Path: news.columbia.edu!watsun.cc.columbia.edu!jaltman
From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Kermit script
Date: 14 Oct 1998 00:29:23 GMT
Organization: Columbia University
Lines: 61
Message-ID: <700r93$kgj$1@apakabar.cc.columbia.edu>
References: <VqRU1.139$fE6.283188@ptah.visi.com>
NNTP-Posting-Host: watsun.cc.columbia.edu
Xref: news.columbia.edu comp.protocols.kermit.misc:9337
In article <VqRU1.139$fE6.283188@ptah.visi.com>,
Mike Ekholm <ekholm@nospam.visi.com> wrote:
: Hello.
: I am attempting to write a simple script to sent the character "s" to the
: serial port, then recive the the output from the serial port. I have
: gotten the sending to work, but the recive part is not working. I have
: tried the "input" command with no luck. if I do the script interactivly,
: then do a "connect" I recive all the data I want, without doing anything
: further. but the connect command is not very fun to use when doing this
: non interactivly. What is the best way to have all the data recived from
: the serial port go to stdout then have the script/kermit terminate?
:
: What I am doing is monitoring a old UPS, which sends the stats out, when
: it recives a "s" on the serial port. here is what I got from the
: interactive session:
:
: [/usr/home/ekholm] C-Kermit>set line /dev/cuaa0
: [/usr/home/ekholm] C-Kermit> set speed 1200
: /dev/cuaa0, 1200 bps
: [/usr/home/ekholm] C-Kermit>output s\13
: [/usr/home/ekholm] C-Kermit>output s\13
: [/usr/home/ekholm] C-Kermit>connect
: => s
: ---- MICRO-FERRUPS SYSTEM STATUS ----
:
: INVERTER: OFF
:
: AC VOLTS OUT 121
: AC AMPS OUT 3.76
: OUTPUT LOAD (VA) 455
: AC VOLTS IN 121
: FREQUENCY 59.97
: BATTERY VOLTS 13.5
: HEATSINK (C) 032
: # POWER OUTAGES 00090
: INVERTER MINUTES 00170.2
: SYSTEM HOURS 032345
: # OVERLOADS 0080
: PROJECTED BACKUP TIME AVAILABLE AT PRESENT LOAD: 0025 MINUTES
: =>
:
: So what I want to do is get everthing after the connect command, then have
: kermit terminate. I have tried the input command, but i can only get that
: to work like 'expect'
:
: Thanks,
: -Mike
SET LINE /dev/cuaa0
SET SPEED 1200
SET CARRIER-WATCH OFF
SET INPUT ECHO ON
OUTPUT s\13
INPUT 10 some-string-that-will-never-come
SET PORT
EXIT
Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
The Kermit Project * Columbia University
612 West 115th St #716 * New York, NY * 10025
http://www.kermit-project.org/k95.html * kermit-support@kermit-project.org